#include "Parser.h"
#include "UDPSocket.h"
#include "ServerParam.h"
#include "PlayerParam.h"
#include "States/FullState.h"

#include <cstdio>
#include <cstring>

void Parser::run()
{
    while (true)
    {
        char msg[10000];
        UDPSocket::instance().Receive(msg);

        //printf("Received command %s\n", msg);


        if (msg[1] == 'f')
        {
            printf("Received command %s\n", msg);
            string s = msg;
            FullState::instance().parse(s);
        }

    }
}
